/**
 * @file Geometric.h
 * @brief GDR functions that access and chnage geometric attributes
 *
 * @author Matt Stallmann @date 18 Dec 2001
 * $Id: Geometric.h 10 2007-06-28 20:08:57Z mfms $
 */

/*
 *  Copyright (C) 2001  Matthias Stallmann.
 *  Contact: matt_stallmann@ncsu.edu
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program (file COPYING.txt); if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
 *  USA.
 */

#ifndef GEOMETRIC_H
#define GEOMETRIC_H

/* functions that access geometric attributes without modification */

extern int vertex_x(vertex vx);
/**< x-coordinate of vertex vx */

extern int vertex_y(vertex vx);
/**< y-coordinate of vertex vx */

extern int knot(edge ej, int indx, int x_y);
/**< return x- or y-coordinate of the indx-th knot of edge 'ej'; 'x_y' is 0
   for the x-coordinate, 1 for the y-coordinate */

extern int window_width_height(int w_h);
/**< return width or height of visible part of window (return width if w_h is
   TRUE, height otherwise); macros for window_width and window_height are
   derived from this */

/************************************************************************/
/* functions that modify geometric attributes */

extern void move_vertex_absolute(vertex vx, int x, int y);
/**< move 'vx' from its current position to (x,y) */

extern void move_vertex_relative(vertex vx, int delta_x, int delta_y);
/**< move 'vx' from its current position (x,y) to (x+delta_x,y+delta_y) */

extern void move_knot(edge ej, int indx, int delta_x, int delta_y);
/**< move the indx-th knot of edge 'ej' from its current position (x,y) to
   (x+delta_x,y+delta_y) */

extern void move_edge_label(edge e, int x, int y);
/**< move the label of edge 'e' to position (x,y) */

#endif
/** end of Geometric.h **/

/*  [Last modified: 2007 06 28 at 19:18:23 GMT] */
